package chapter01;

import java.util.Scanner;

public class Test10_IfElseIf {
    public static void main(String[] args) {
        //用分数确定等级
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入分数，范围0-100之间：");
        int score = scanner.nextInt();
        if(score>100){
            System.out.println("分数超出范围");
        } else if (score>=90) {
            System.out.println("分数等级为A");
        }else if (score>=80){
            System.out.println("分数等级为B");
        } else if (score>=70) {
            System.out.println("分数等级为C");
        } else if (score>=60) {
            System.out.println("分数等级为D");
        } else if (score>=0) {
            System.out.println("分数等级为F");
        }else{
            System.out.println("分数超出范围");
        }
    }
}
